<!DOCTYPE html>
<html lang="cn" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>互联网村镇管理平台</title>
    <link rel="stylesheet" type="text/css" th:href="@{/css/common.css}"/>
    <link rel="stylesheet" type="text/css" th:href="@{/css/main.css}"/>
    <div th:include="admin/common/common"></div>
    <script type="text/javascript" charset="utf-8" th:src="@{/js/libs/ckeditor/ckeditor.js}"></script>
    <script type="text/javascript" th:src="@{/js/libs/ajaxfileupload.js}"></script>
    <script type="text/javascript" th:src="@{/js/web/hotel/hotelInfo.js}"></script>
</head>
<body>
<div class="container clearfix">
    <div class="main-wrap">
        <div class="crumb-wrap">
            <div class="crumb-list">
                <i class="icon-font">&#xe9bc;</i>
                <a href="javascript:void(0);">旅游指导</a>
                <span class="crumb-step">&gt;</span>
                <span class="crumb-name">修改酒店/美食</span>
            </div>
        </div>
        <div class="result-wrap">
            <div class="result-content">
                <form id="editHotelInfoForm" onsubmit="return excuteEditHotelInfo();">
                    <input type="hidden" id="hotelId" name="hotelId" th:value="${hotelInfo?.hotelId}"/>
                    <table class="insert-tab" width="100%">
                        <tbody>
                        <tr>
                            <th style="width:15%;">
                                <i class="require-red">*</i>
                                酒店/美食名称：
                            </th>
                            <td>
                                <input class="common-text required" id="title" name="title" style="width:99%" th:value="${hotelInfo?.title}"
                                       maxlength="50" type="text"/>
                            </td>
                        </tr>
                        <tr>
                            <th style="width:15%;">
                                <i class="require-red">*</i>
                                酒店/美食简介：
                            </th>
                            <td>
                                <input class="common-text required" id="desc" name="desc" style="width:99%" th:value="${hotelInfo?.desc}"
                                       maxlength="50" type="text"/>
                            </td>
                        </tr>
                        <tr>
                            <th style="width:15%;">
                                <i class="require-red">*</i>
                                酒店/美食特征：
                            </th>
                            <td>
                                <input class="common-text required" id="feature" name="feature" style="width:99%" th:value="${hotelInfo?.feature}"
                                       maxlength="50" type="text"/>
                            </td>
                        </tr>
                        <tr>
                            <th style="width:15%;">
                                <i class="require-red">*</i>
                                酒店/美食位置：
                            </th>
                            <td>
                                <input class="common-text required" id="address" name="address" style="width:99%" th:value="${hotelInfo?.address}"
                                       maxlength="50" type="text"/>
                            </td>
                        </tr>
                         <tr>
                            <th style="width:10%;">
                                <i class="require-red">*</i>酒店类型：
                            </th>
                            <td>
                                 <select name="type" id="type"  style="height: 30px; width: 200px;">
                                    <option value="-1">全部</option>
                                    <option value="1" th:selected="${hotelInfo?.type == 1}">酒店</option>
                                    <option value="2" th:selected="${hotelInfo?.type == 2}">民宿</option>
                                 </select>
                            </td>
                        </tr>
                        <!--<tr>-->
                            <!--<th style="width:15%;">-->
                                <!--<i class="require-red">*</i>-->
                                <!--酒店/美食经度：-->
                            <!--</th>-->
                            <!--<td>-->
                                <!--<input class="common-text required" id="lng" name="lng" style="width:99%" th:value="${hotelInfo?.lng}"-->
                                       <!--maxlength="50" type="text"/>-->
                            <!--</td>-->
                        <!--</tr>-->
                        <!--<tr>-->
                            <!--<th style="width:15%;">-->
                                <!--<i class="require-red">*</i>-->
                                <!--酒店/美食纬度：-->
                            <!--</th>-->
                            <!--<td>-->
                                <!--<input class="common-text required" id="lat" name="lat" style="width:99%" th:value="${hotelInfo?.lat}"-->
                                       <!--maxlength="50" type="text"/>-->
                            <!--</td>-->
                        <!--</tr>-->
                        <tr>
                            <th style="width:15%;">
                                <i class="require-red">*</i>
                                酒店/美食内容：
                            </th>
                            <td>
                                <textarea id="oldContent" style="display: none;" th:text="${hotelInfo?.content}"></textarea>
                                <textarea name="content_editor" id="content_editor" rows="10" cols="80">
					            </textarea>
                                <script>
                                    CKEDITOR.replace('content_editor', {allowedContent:true, filebrowserImageUploadUrl: shiro.baseUrl + "uploadCKEditor",
                                    	toolbar : 'Full',
							            filebrowserFlashUploadUrl :shiro.baseUrl+"uploadVideo"})
                                </script>
                            </td>
                        </tr>
                        <tr>
                            <th style="width:15%;">
                                <i class="require-red">*</i>
                                缩略图片：
                            </th>
                            <td>
                                <div class="uploadPicture">
                                    <img id="pictureImg" th:src="${thumbnail}" width="106" height="122" alt="缩略图片"/>
                                    <input type="file" onchange="uploadPicture();" id="pictureFile" style="display:none;" name="pictureFile"/>
                                    <input type="hidden" id="picture" th:value="${hotelInfo?.thumbnail}" />
                                    <a href="javascript:void(0);" id="uploadPictureLink">上传图片</a>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <th></th>
                            <td>
                                <input class="btn btn-primary btn6 mr10" value="提交" type="submit"/>
                                <input class="btn btn6" onclick="history.go(-1)" value="返回" type="button"/>
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </form>
            </div>
        </div>
    </div>
</div>
<script type="text/javascript">
    CKEDITOR.instances.content_editor.setData($('#oldContent').val());
</script>
</body>
</html>